package com.weather.data.entity.DO;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 天擎要素表
 * </p>
 *
 * @author baomidou
 * @since 2024-12-26
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("weather_sky_element")
@Schema(name = "SkyElement", description = "天擎要素表")
public class SkyElement extends Model<SkyElement> {

    private static final long serialVersionUID = 1L;

    @Schema(description = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "要素名称")
    @TableField("element_name")
    private String elementName;

    @Schema(description = "要素代码")
    @TableField("element_code")
    private String elementCode;

    @Schema(description = "关联的天擎id")
    @TableField("sky_id")
    private Long skyId;


    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
